package com.abc;

import java.util.UUID;

public class datacs {
    public static String getdatafilename(String filename){
        String replace = UUID.randomUUID ().toString ().replace ("-", "")+"_"+filename;
        return replace;
    }
    public static String getfatafilepath(String path,String file){
        //获取文件名的hash码,使用文件名获取2-3级目录
        int i = file.hashCode ();
        int h1=i & 15;
        int h2=i>>4 &15;
        return path+"\\"+h1+"\\"+h2+"\\"+file;
    }
}
